Learn how to redirect a query to a URL using Rules.
help
and click Apply.
saveRule
method. When adding a rule, you need to define a condition and a consequence. In the consequence, add a search parameters and configure renderingContent
using the following template:
renderingContent.redirect
property is present in the API response. You have two options:
help
in the input.
{"redirect": "https://www.algolia.com/support"}
saveRule
method. When setting a rule, you need to define a condition and a consequence.
userData
property is present in the API response.
If you’re using one of the InstantSearch UI libraries, see Redirects in InstantSearch.
url
to redirect the queries, and a list of query_terms
, that trigger the redirect.
For example, the query “star wars” should redirect to https://www.google.com/#q=star+wars
.
query_terms
to the list of attributesForFaceting
,
so that you can filter on it:
query_terms
with the content of the current query, to match only records that contain the current query exactlyhitsPerPage=1
, as you only need the first record